package vip.xiaonuo.smzq.modular.dictionary.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import vip.xiaonuo.smzq.modular.dictionary.entity.Cb04Kszl;
import vip.xiaonuo.smzq.modular.dictionary.mapper.Cb04KszlMapper;
import vip.xiaonuo.smzq.modular.dictionary.service.ICb04KszlService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import vip.xiaonuo.common.page.CommonPageRequest;

import javax.annotation.Resource;
import java.util.List;

/**
 * 矿石种类 服务实现类
 *
 * @author eomer
 * @since 2024-02-21
 */
@Service
public class Cb04KszlServiceImpl extends ServiceImpl<Cb04KszlMapper, Cb04Kszl> implements ICb04KszlService {

    @Resource
    private Cb04KszlMapper cb04KszlMapper;

    @Override
    public Page<Cb04Kszl> page(Cb04Kszl cb04Kszl) {
        QueryWrapper<Cb04Kszl> queryWrapper = new QueryWrapper<>();
        return this.page(CommonPageRequest.defaultPage(), queryWrapper);
    }
    /**
     * 矿石质量筛选下拉框
     * kqdm 矿区代码
     */
    @Override
    public List<Cb04Kszl> getKszlList(Integer kcdm) {
        QueryWrapper<Cb04Kszl> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("kcdm", kcdm);
        return cb04KszlMapper.selectList(queryWrapper);
    }
}
